package com.schoolET.entity.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author: lin
 * @className: AdminEmailVO
 * @createTime: 2024-05-31  19:32
 * @description: 邮箱和账号
 */
@Data
@ApiModel(value = "AdminVO对象", description = "管理员登录")
public class AdminEmailVO {

    @NotBlank(message = "参数不能留白、不能只由空格、Tab、换行符组成")
    @NotNull(message = "用户名不能为空")
    @ApiModelProperty(value = "用户名",required = true)
    private String account;


    @NotBlank(message = "参数不能留白、不能只由空格、Tab、换行符组成")
    @NotNull(message = "邮箱不能为空")
    @Pattern(regexp = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$")
    @ApiModelProperty(value = "邮箱",required = true)
    private String email;
}
